package org.sgroup.imenu;

import java.util.ArrayList;
import java.util.List;
import org.sgroup.imenu.bo.Item;
import org.sgroup.imenu.controladapter.OrderItemListAdapter;
import android.app.Activity;
import android.app.Service;
import android.content.Context;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

public class OrderListItemView extends LinearLayout {
	private ArrayList<Item> mOrderListCache;

	public OrderListItemView(Context context, ArrayList<Item> items) {
		super(context);
		mOrderListCache = items;
		LayoutInflater linflater = (LayoutInflater) ((Activity) context)
				.getSystemService(Service.LAYOUT_INFLATER_SERVICE);
		linflater.inflate(R.layout.submit_order, this);

		TextView tv = (TextView) findViewById(R.id.title);
		tv.setText("YOUR ORDER");
		ListView listview = (ListView) findViewById(R.id.list_item);
		OrderItemListAdapter adapter = new OrderItemListAdapter(context,
				R.layout.list_item_order_view, items);
		listview.setAdapter(adapter);

	}

}
